﻿using System;

namespace Yuchen.NPA.Core.CompilerService.RegularExpression
{
    internal class GroupNode : Node
    {
        public override NodeType Type { get; } = NodeType.Group;

        public GroupNode(Node content) : base(new[] { content })
        {
            if (content == null)
            {
                throw new ArgumentNullException(nameof(content));
            }
        }

        public override string ToString()
        {
            return $"({Children[0]})";
        }
    }
}
